package com.bookrecommendation.client;

import java.util.HashMap;

import com.bookrecommendation.client.facebook.FacebookAuthentication;
import com.google.gwt.core.client.EntryPoint;



/** 
 * Entry point classes define <code>onModuleLoad()</code>.
 * 
 * @Architecture 
 */
public class GWTEntryPoint implements EntryPoint {

	public static int friendsAmount = 0;

	public static int friendsSearched = 0;

	public static HashMap<String, Integer> facebookUserBooks = new HashMap<String, Integer>();

	public static HashMap<String, Integer> facebookFriendsBooks = new HashMap<String, Integer>();

	public static HashMap<String, Integer> facebookTopBooks = new HashMap<String, Integer>();

	public static HashMap<String, Integer> facebookTopBooksRecommended = new HashMap<String, Integer>();

	public void onModuleLoad() {

		new FacebookAuthentication();
	}

	public static int addValue(HashMap<String, Integer> map, String id) {

		if (map.get(id) != null) {

			return map.get(id) + 1;
		} else {

			return 1;
		}
	}
}
